/*
 * @Description: 银行账户类
 * @Author: rendc
 * @Date: 2024-08-16 09:36:58
 * @LastEditors: rendc
 * @LastEditTime: 2024-08-16 10:05:42
 */
public class Account{
  //步骤1：private修饰数据成员
  private String id; // 卡号
  private double balance; //金额
  // 步骤2：提供公开的get set方法 用来操作成员属性
  public void setId(String id){
    // 设置银行卡账号
    this.id = id;
  }
  public String getId(){
    // 获取银行卡账号
    return id;
  }
  // public void setBalance(double newBalance){
  public void setBalance(double balance){
    // 设置余额
    // balance += newBalance;
    // balance = newBalance;
    this.balance = balance;
  }
  public double getBalance(){
    // 获取余额
    return balance;
  }
}